<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        html,
        body {
            margin: 0 auto;
            padding: 0;
        }

        .one {
            margin: 0 auto;
            width: 600px;
            height: 800px;
            overflow-y: scroll;
            background: lightblue;
        }

        .two {
            width: 100%;
            height: 2000px;
            background-color: lightsalmon;
        }


        /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
        ::-webkit-scrollbar {
            width: 16px;
            /*滚动条宽度*/
            height: 16px;
            /*滚动条高度*/
        }

        /*定义滚动条轨道 内阴影+圆角*/
        ::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            /*滚动条的背景区域的圆角*/
            background-color: red;
            /*滚动条的背景颜色*/
        }

        /*定义滑块 内阴影+圆角*/
        ::-webkit-scrollbar-thumb {
            border-radius: 10px;
            /*滚动条的圆角*/
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
            background-color: green;
            /*滚动条的背景颜色*/
        }
    </style>

</head>

<body>

    <div class="one">

        <div class="two"></div>

    </div>


</body>

</html>